package com.srcptit.java.tranning.hoangdd.btvn1;

import java.util.Scanner;

public class Bai4Muc1 {
	public static boolean ngto(int n){
		if(n<2)
			return false;
		for(int i=2; i<=Math.sqrt(n); i++)
			if(n%i==0) 
				return false;
		return true;
	}
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int kt = 0, bp = 2;
		System.out.print("Nhap so nguyen n = ");
		int n = sc.nextInt();
		while(kt<n){
			if(ngto(bp) == true){
				System.out.println(bp);
				kt++;
			}
			bp++;
				
		}

	}
}
